package com.easy.mapper;

import com.easy.bean.User;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
//访问数据库
@Repository
@Mapper
public interface UserMapper {
    int add(@Param("param")User user);

    int del(@Param("id")Integer id);

    int edit(@Param("param")User user);

    List<User> all(@Param("param")User user);

    User one(@Param("id")Integer id);

    int pageCount(@Param("param")User user);

    List<User> page(@Param("page")Page page,@Param("param") User user);

    User getByPhone(@Param("phone")String phone);

    int editPassword(@Param("param")User user);


}
